home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
biz
/
demo
/
tdsdemo.lha
/
TDSDemo
/
tds.doc
< prev
next >
Wrap
Text File
|
1993-03-29
|
19KB
|
699 lines
Twilight Development System
Copyright 1993 Twilight Software
Written by Claudio Zani
Via Liuzzi 1
42020 Cadelbosco Sotto (RE)
Tel. 0522/911710
InterNet: zani@cs.unibo.it
1. Introduction
Twilight Development System (TDS) provides an integrated
environment for writing and compiling source files like Turbo
Pascal or Borland C++. Its main feature is to simplify and speed
up the development of programs composed of different source files
(modules). With TDS it's possible to compile and link these
modules into an executable file with a single command and if the
compiler finds some errors, they will be reported directly by the
editor. TDS doesn't provide its own compiler, but can use any
compiler or assembler callable from CLI. It has internal message
converters for DICE C, SAS C (former LATTICE C), Aztec C, DevPac
Assembler and it's possible to write custom converters for any
other compiler.
TDS is composed of 3 programs:
Twilight Editor (TED)
Twilight Make (TMAKE)
Twilight Reference Generator (TREFS)
1.1. Twilight Editor (TED)
TED is a text editor with many functions to support the creating
and editing of source files. The number of files which can be open
at the same time is limited only by the amount of free memory and
so is the length of a single text line. For every file Ted
remembers the changes done and allows with UNDO and REDO to go
back through the changes. There are also functions to handle
blocks and to search for strings in the file.
But the main feature is the project manager which handles the
compiling and linking of the source files. After entering the
names of the source files and the options for the compiler,
assembler and linker in the project, the user can start the
compiling process with the command BUILD. To execute this command
TED relies on the second program called Twilight Make (TMAKE)
described below, which runs concurrently to the editor, so it's
possible to continue to edit the source files while the compiler
is working.
to start TED
- on the Workbench click on the icon called TED
- on the CLI write "run ted file(s)"
1.2. Twilight Make (TMAKE)
TMAKE is similar to the program 'make' used in the development of
programs composed of more than one source file. It checks every
source file if it has been modified and depending on the file
extension (for example '.c' or '.asm') compiles or assembles it.
Then it links all the object files together to obtain the
executable file. TMAKE doesn't use 'makefiles', but instead relies
on project files which can be created with TED. It has been
designed to interface to the most popular compilers like the SAS C
(former Lattice C), Aztec C, DICE C and assemblers like the
DevPac. It's also possible to write a custom message converter if
the compiler used is not supported. TMAKE can also be used as a
standalone program from CLI to build projects created with Ted.
to run TMAKE
- tmake -a -fsource_file project_file
with -a it recompiles all source files in the project
with -f only a single source file will be compiled
1.3. Twilight Reference Generator (TREFS)
TREFS generates reference files used by the FIND REFERENCE command
of the menu SEARCH. With this command it's possible to get
information about a particular keyword, e.g. moving the cursor to
the word Window and pressing the HELP key will result in the
loading of the file "intuition.h" and the editor positioning the
cursor on the start of the definition of the structure Window.
to run TREFS
- trefs reference_file source_file(s) (it supports wildcards)
1.4 Installation
To install TDS copy all files in a directory and execute
"assign TDS: directory" on the CLI. If you use the program from CLI
add "path TDS: add" to the shell-startup. With Kickstart 1.3
TDS uses the arp.library which must be copied into LIBS:.
2. Menus
2.1. Menu FILE
This menu contains the commands to open, insert, save and close
the source files and to hide and reveal the windows. The number of
windows which can be open at the same time depends only from the
amount of free memory.
NEW
opens a new window and creates an empty file
OPEN...
opens a new window and loads a file
LOAD...
loads a file in the current window
INSERT...
inserts a file in the current file at the cursor position
SAVE
saves the file with the current name
SAVE AS...
saves the file with a new name
SAVE CHANGED
saves all files which have been modified
HIDE (CTRL-H)
hides the current window, but the contents of the file remains in
memory
REVEAL... (CTRL-R)
opens a requester listing all the files currently in memory
including those hidden. With this requester the user can select
the file he/she wants to edit or to reveal a file which has been
hidden.
CLOSE
closes the current window disposing the file (has the same effect
as selecting the close gadget of the window)
ABOUT
displays some information about the program and the amount of free
memory
SLEEP (F10)
This command puts TED in sleep mode. It closes all windows and the
screen, but all files remain in memory. The files which has been
modified will be saved. To
wake up the editor it's necessary to press the left CTRL-SHIFT-ALT-
F10.
QUIT
quits the program
2.2. Menu EDIT
This menu contains all the commands necessary to handle selected
portions of the file (blocks). To select a block simply position
the mouse pointer at the start of the block and click the left
mouse button, then drag the mouse with the left button pressed to
the end of the block and finally release the button. Double
clicking the left button selects the word under the mouse pointer,
while holding down also the SHIFT key will select all the line.
Once a block has been selected it's possible to use one of the
following commands:
CUT
cuts the block and copies it into the clipboard
COPY
copies the block into the clipboard without modifying the file
PASTE
if there is a block selected then it will be replaced with the
contents of the clipboard, otherwise the contents of the clipboard
will be inserted at the position of the cursor
ERASE
erases the block without copying it into the clipboard
SAVE...
saves the block as a file on the disk
INDENT >>
has a submenu with 2 options:
FORWARD
moves the block one position to the right
BACKWARD
moves the block one position to the left
The following commands are used to step forward or backward
through the changes done to the file. TED remembers for each file
a maximum number of changes which can be modified with the command
EDITOR... from the menu SETTINGS.
UNDO
steps backward one change
REDO
steps forward one change
2.3. Menu SEARCH
This menu contains the commands for finding and replacing strings
in the file, for jumping to a specified line, for finding the
bracket which matches the one at the cursor and to get information
about a particular keyword.
FIND...
opens a requester in which the user writes the string to find and
sets the following search options:
CASE SENSITIVE
distinguishes between upper and lower case
WORDS ONLY
finds only strings surrounded by spaces
GLOBAL SEARCH
searches through all open files
WILDCARDS
uses '?' as a wildcard which matches any character
REPLACE...
opens a requester with the string to find, the string to replace
and the search options
REPEAT LAST
repeats the last operation (find or replace) without opening a
requester
MATCH BRACKET (CTRL-M)
finds the matching bracket to the bracket at the cursor
for example: '(' matches ')'
FIND REFERENCE (HELP)
Searches the word on the cursor in the reference files and if it
exists, load the file it references and moves the cursor to the
line in which it has been defined.
GOTO LINE...
opens a requester with the number of the line to jump
2.4. Menu COMPILE
In this menu are the commands to compile source files, to build an
entire executable program and to run and debug it. All the
commands use the project file defined by the commands of the menu
PROJECT.
COMPILE
compiles the source file in the current window
BUILD
builds the executable file compiling only the source files which
has been modified
BUILD ALL
builds the executable file compiling all the source files even if
they have not been modified
RUN
runs the executable file
DEBUG
runs the debugger
NEXT ERROR
PREVIOUS ERROR
if one of the previous commands has reported some errors, these
commands can be used to position the cursor on the line(s) where
the error occurred and displaying the error message.
LOAD ERRORS
loads the error file as it has been created by the compiler or the
linker
The commands COMPILE, BUILD and BUILD ALL are not built into the
editor, but their execution is demanded to TMAKE. When one of
these commands has been selected, TED starts TMAKE which executes
the command and if it finds some errors, returns an error list to
TED. Using the multitasking facilities of the operating system
TMAKE runs in background, so the user can continue to edit his/her
source files. Also these commands open a console window on the
Workbench where it's possible to follow the compiling process and
to interrupt it with Ctrl-C.
2.5. Menu PROJECT
This menu contains all the commands necessary to create, open and
save project files. The project file contains the names of the
source files (modules) of the program, the options for the
compiler, assembler, linker and debugger and the work directories.
Once the user has created a project, he/she can use the commands
COMPILE, BUILD and BUILD ALL in the menu COMPILE to compile a
single source file or to rebuild the entire executable file.
NEW
creates a new project
OPEN...
opens an existing project
SAVE
saves the project with the current name
SAVE AS...
saves the project with a new name (the project file extension must
be '.prj')
MODULES...
opens a requester where the user can insert the names of the
modules and which has the following buttons:
ADD...
adds a source file to the list
REMOVE
removes the current source file from the list
EDIT
edits the current source file
UP
moves the source file up one position
DOWN
moves the source file down one position
OPTIONS...
opens a requester with the options for the compiler, assembler,
linker and debugger and has the following gadgets:
PROGRAM NAME
name of the executable file
PROGRAM ARGUMENTS
arguments for the program (used by RUN and DEBUG)
OBJECT DIRECTORY
directory for the object files
SOURCE DIRECTORY
list of directories where to search source and include files
ADD...
adds a directory to the source directories
REMOVE
removes a directory from the source directories
COMPILER...
opens the requester with the options for the compiler
ASSEMBLER...
opens the requester with the options for the assembler
LINKER...
opens the requester with the options for the linker
DEBUGGER...
opens the requester with the options for the debugger
COMMAND...
opens the requester with the options for the execution of the
commands
2.5.1. Requester COMPILER...
This requester contains the options for the compiler:
COMMAND
command name of the compiler:
e.g. "lc" (for SAS C)
OPTIONS
command options for the compiler:
"%src","%obj","%err" have a special meaning:
"%src" stands for the source file
"%obj" stands for the object file
"%err" stands for the error file (if not present, then standard
output will
be used)
e.g. "-d -o%obj %src" and the source file "text.c" becomes
"-d -otest.o test.c".
EXTENSION
sets the file extension of the source files for the compiler
MESSAGES
sets the type of messages returned by the compiler (SAS C, Aztec
C, DICE C, Custom). With Custom it's possible to use a custom
message converter. TMAKE will execute this converter after having
received the error messages from the compiler and passing them to
the standard input. After the conversion the error messages must
be passed to the standard output with the following format:
"<test.c> 10 E <Error Message>" for an error
"<test.c> 21 W <Error Message>" for a warning
<test.c> : source file
10 : line
E or W : error or warning
<Error Message> : error message
The name of the converter has to be set with CONVERTER.
IGNORE WARNINGS
ignores any warning messages
CHECK HEADERS
option used only for C source files: if set TMAKE checks for every
source file if an include file has been modified. If so it
compiles the source file.
The checking will be done only for include files in this format:
#include "defs.h"
and not for:
#include <exec/types.h>
2.5.2. Requester ASSEMBLER...
This requester contains the options for the assembler:
COMMAND
command name of the assembler:
e.g. "genim2" (for DevPac)
OPTIONS
command options for the assembler:
"%src","%obj","%err" have a special meaning:
"%src" stands for the source file
"%obj" stands for the object file
"%err" stands for the error file (if not present, then standard
output will
be used)
e.g. "-d -o%obj %src" and the source file "text.asm" becomes
"-d -otest.o test.asm".
EXTENSION
sets the file extension of the source files for the assembler
MESSAGES
sets the type of messages returned by the assembler (DevPac, SAS
C, Aztec C, DICE C, Custom). With Custom it's possible to use a
custom message converter. TMAKE will execute this converter after
having received the error messages from the assembler and passing
them to the standard input. After the conversion the error
messages must be passed to the standard output with the following
format:
"<test.asm> 10 E <Error Message>" for an error
"<test.asm> 21 W <Error Message>" for a warning
<test.asm> : source file
10 : line
E or W : error or warning
<Error Message> : error message
The name of the converter has to be set with CONVERTER.
IGNORE WARNINGS
ignores any warning messages
2.5.3. Requester LINKER...
This requester contains the options for the linker:
COMMAND
command name of the linker:
e.g. "blink" (for SAS C)
OPTIONS
command options for the linker:
"%lnk","%exe","%err" have a special meaning:
"%lnk" stands for the file containing the names of the object
files
"%exe" stands for the executable file
"%err" stands for the error file (if not present, then standard
output will
be used)
e.g. "lib:c.o WITH %lnk TO %exe LIB lib:lc.lib lib:amiga.lib"
becomes
"lib:c.o WITH test.lnk TO test LIB lib:lc.lib lib:amiga.lib"
EXTENSION
sets the file extension of the object files
2.5.4. Requester DEBUGGER...
This requester contains the options for the debugger:
COMMAND
command name of the debugger:
e.g. "monam2" (for DevPac)
OPTIONS
command options for the debugger:
"%exe","%arg" have a special meaning:
"%exe" stands for the executable file
"%arg" stands for the arguments
2.5.5 Requester COMMAND...
This requester contains the options for the execution of the
commands:
COMMAND PATH
list of directories where to search the commands
ADD...
adds a directory to the list
REMOVE
removes the current directory from the list
STACKSIZE
stack size used by the commands
CONSOLE
name of the console window
2.6. Menu EXTRAS
UPPER CASE WORD (CTRL-K)
converts the word at the cursor in upper case
LOWER CASE WORD (CTRL-L)
converts the word at the cursor in lower case
FORMAT PARAGRAPH (CTRL-F)
formats a portion of text called a paragraph. The paragraph starts
at the cursor and ends with the first blank line. The margins of
the paragraph can be set with the menu SETTINGS EDITOR... in LEFT
MARGIN and RIGHT MARGIN.
2.7. Menu SETTINGS
This menu contains the settings for the program:
AUTOINDENT
activates the automatic indentation
WORDWRAP
activates the automatic wordwrap at the end of a line
OVERSTRIKE
activates the overstrike mode
CREATE ICONS?
if set, TDS creates an icon for every file saved
EDITOR...
opens a requester with the options for the editor:
LANGUAGE
selection of the language (for now only English)
AUTOINDENT
activates the automatic indentation
WORDWRAP
activates the automatic wordwrap at the end of a line
OVERSTRIKE
activates the overstrike mode
STRIPBLANKS
removes any blanks and tabs from the end of the line which has
been modified
AUTOSAVE
activates the autosave mode
AUTOSAVE DELAY
sets the time for the autosave mode in minutes
BACKUP
creates a backup file called *.bak for every file saved
TABWIDTH
sets the width of the tab
LEFT MARGIN
sets the left margin (used by WORDWRAP and FORMAT PARAGRAPH)
RIGHT MARGIN
sets the right margin (used by WORDWRAP and FORMAT PARAGRAPH)
MAX. CHANGES
sets the maximum number of changes recorded for every file
PRIORITY
sets the priority of the process which runs the editor
TOOLNAME
tool name used when creating icons
DISPLAY...
opens a requester with the options for the screen:
SCREEN TYPE
sets the type of the screen
SCREEN WIDTH
sets the screen width
SCREEN HEIGHT
sets the screen height
CLONE WORKBENCH
clones the dimensions of the Workbench screen
AUTOSIZE
if set, every new window will open at the maximum size
FONT NAME
name of the font used
FONT SIZE
size of the font used
ASL REQUESTER
if set, TDS will use the ASL requesters (only for OS2.0 and
above)
REFERENCE...
opens a requester with the list of the reference files:
ADD...
adds a file to the list
REMOVE
removes a file from the list
LOAD SETTINGS...
loads the settings
SAVE SETTINGS
saves the settings with the current name
SAVE SETTINGS AS...
saves the settings with a new name
3. Keyboard
CTRL-Y deletes a line
CTRL-U inserts the last line deleted
CTRL-Q deletes till the end of the line
CTRL-M like menu command MATCH BRACKET
CTRL-H like menu command HIDE
CTRL-R like menu command REVEAL
CTRL-F like menu command FORMAT PARAGRAPH
CTRL-L like menu command LOWER CASE WORD
CTRL-K like menu command UPPER CASE WORD
CTRL-S start of block
CTRL-E end of block
CTRL-n (F1) next window
CTRL-p (F2) previous window
F10 like menu command SLEEP
HELP like menu command FIND REFERENCE
4. ARexx Interface
The ARexx Interface has many commands for moving the cursor,
inserting and deleting text, loading and saving files etc. It also
has a command to remap any key to a command or to a ARexx macro.
5. Technical Notes
The programs have been written with the DICE C (thanks Matt) and
the DevPac Assembler. They run on any Amiga with Kickstart 1.3, 2.0
and 3.0.
6. Improvements
- split mode for the windows
- printing of the source files
- record and replay of keyboard macros
- automatic upper case conversion of single words
- automatic syntax checker for C, Modula II, etc.
- new screen modes available with OS2.0, OS3.0 and AGA
- support for the local.library